package Chain_of_Responsibility_Pattern;

public class CLIENT {
    public static void main(String[] args) {
        // 创建请求
        LeaveResponse leaveResponse = new LeaveResponse("小明",7,"肚子疼");

        // 创建具体执行者
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        // 创建责任链
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        // 递交请求
        groupLeader.submit(leaveResponse);
    }
}
